package com.mzp.XbShop.service;

import com.mzp.XbShop.common.util.IdWorker;
import com.mzp.XbShop.mapper.DeliveryDao;
import com.mzp.XbShop.pojo.Delivery;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author admin
 * @Description user_delivery 服务层
 * @date 2021-04-19 10:42:24
 */
@Service
public class DeliveryService {

    @Autowired
    private DeliveryDao deliveryDao;

    @Autowired
    private IdWorker idWorker;

    public List<Map<String, Object>> DeliveryfindByUserId(String userId) {
        return deliveryDao.DeliveryfindByUserId(userId);
    }

    public boolean setZero(String userid) {
        return deliveryDao.setZero(userid);
    }

	public void setOne(String id) {
		deliveryDao.setOne(id);
	}



    public Integer insert(Delivery delivery) {
        return deliveryDao.insert(delivery);
    }

    public void delete(Integer id) {
        deliveryDao.notdelete(id);
    }
}
